package main

import "fmt"

// 每次1或2

func climbStairs(n int) int {
	//最简单的几个情况
	if n == 0 {
		return 0
	}

	x2, x1, x := 0, 0, 1
	for i := 1; i <= n; i++ {
		x2 = x1
		x1 = x
		x = x1 + x2
	}
	return x
}

func main() {
	res := climbStairs(3)
	fmt.Println(res)
}
